package com.t.bricks.bussiness.db.entity.ordersdetail;

import io.swagger.annotations.ApiModelProperty;

import com.t.bricks.annotation.DataInfo;
import com.t.bricks.bussiness.db.entity.ordersdetail.base.OrdersDetailBase;

/**
 * 订单详情'OrdersDetail'表扩展实体类
 * 注意:可根据需要创建不同的多个扩展实体类,而不是把所有的扩展属性都集中到一个类中
 * @author HuangXinBian
 */
public class OrdersDetail extends OrdersDetailBase {
	
	private static final long serialVersionUID = -1L;// 使用rmi时需修改
	
	/**
	 * 商品代码
	 */
	@DataInfo( sDbName="BricksMall", sTableName="Wares",
		sName="sCode", sRelName="sId", sRelMainName="sWaresId")
	@ApiModelProperty(value="商品代码", example="", position=99)
	private String sCode;
	
	/**
	 * 获得 商品代码
	 * @return sCode 商品代码
	 */
	public String getsCode() {
		return sCode;
	}

	/**
	 * 设置 商品代码
	 * @param sCode 商品代码
	 */
	public void setsCode(String sCode) {
		this.sCode = sCode;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return OrdersDetail
	 */
	public static OrdersDetail copy(OrdersDetail source) {
		if (null == source) {
			return null;
		}
		
		OrdersDetail target = new OrdersDetail();
		target.setsId(source.getsId());
		target.setsOrderId(source.getsOrderId());
		target.setsWaresId(source.getsWaresId());
		target.setsWaresName(source.getsWaresName());
		target.setiNumber(source.getiNumber());
		target.setmPrice(source.getmPrice());
		target.setmCouponPay(source.getmCouponPay());
		target.setiTallyLargess(source.getiTallyLargess());
		target.setsCode(source.getsCode());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return OrdersDetail
	 */
	@Override
	public OrdersDetail clone() {
		return copy(this);
	}
	
}
